<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<div id="dictContainer" class="page-box">
	<div  class="box-dict-type">
		<el-row class="qry-box">
		   <el-form :inline="true" :model="userQryForm" onsubmit="return false">
		      <el-form-item>
		         <span>字典类型管理</span>
		      </el-form-item>
		      <el-form-item>
		          <el-button type="text" icon="plus" @click="openAddPage(2,$event)">新增</el-button>
		      </el-form-item>
			  <el-form-item label="用户名：">
			    <el-input v-model="dictTypeForm.name" placeholder="请输入字典类型名称或编码"></el-input>
			  </el-form-item>
			  <el-form-item>
			    <el-button type="primary" icon="search" @click="qryDictType" :loading="loading">查询</el-button>
			  </el-form-item>
			</el-form>
		</el-row>
		<el-row class="table-box">
			  <el-table :data="dictTypes" border="true" stripe="true" style="width: 100%" :height="tableHeight" highlight-current-row="true"  @current-change="handleDictTypeCurrentChange">
			    <el-table-column prop="code" label="字典编码" min-width="100" ></el-table-column>
			    <el-table-column prop="name" label="字典名称" min-width="160"></el-table-column>
			    <el-table-column label="操作" min-width="240">
			        <template scope="scope">
			            <el-button type="primary" icon="edit" size="small" :pid="scope.row.id" @click="openDictValueWin($event)">字典值管理</el-button>
				        <el-button type="warning" icon="edit" size="small" @click="openAddPage(2,$event)" :pid="scope.row.id" >修改</el-button>
				        <el-button type="danger" icon="delete" size="small" @click="del"  :pid="scope.row.id">删除</el-button>
			        </template>
			    </el-table-column>
			  </el-table>
		 </el-row>
		 <el-row class="pagination-box">
			<el-pagination  @current-change="handleCurrentChange"
			 :current-page="currentPage" :page-size="pageSize" :total="totalCount" layout="total,prev, pager, next">
		    </el-pagination>
		 </el-row>
	 </div>
	  <div  class="box-dict-value">
		<el-row class="qry-box">
		   <el-form :inline="true" :model="userQryForm" onsubmit="return false">
		     <el-form-item>
		         <span>【{{selectDictName}}】-字典值管理</span>
		      </el-form-item>
		      <el-form-item>
		          <el-button type="text" icon="plus" @click="openAddDictValuePage(1,$event)">新增</el-button>
		      </el-form-item>
			</el-form>
		</el-row>
		<el-row class="table-box">
			  <el-table :data="dictValues" border="true" stripe="true" style="width: 100%" :height="tableHeight"  highlight-current-row="true"> 
			    <el-table-column prop="code" label="字典值编码" min-width="100" ></el-table-column>
			    <el-table-column prop="name" label="字典值名称" min-width="160"></el-table-column>
			    <el-table-column label="操作" min-width="240">
			        <template scope="scope">
				        <el-button type="warning" icon="edit" size="small" @click="openAddDictValuePage(2,$event)" :pid="scope.row.id" >修改</el-button>
				        <el-button type="danger" icon="delete" size="small" @click="delDictValue"  :pid="scope.row.id">删除</el-button>
			        </template>
			    </el-table-column>
			  </el-table>
		 </el-row>
	 </div>
</div>
<script type="text/javascript" src="${ctx }/static/sys/admin/dict/dictIndex.js"></script>

